package com.hong.chapter7;

/**
 * 通过一个类去实现runnable接口然后通过线程来实现实例
 */
public class BankVersion3 {

    public static void main(String[] args) {
        final  SynchronizedRunnable ticketWindow = new SynchronizedRunnable();

        Thread widowThread1 = new Thread(ticketWindow,"一号窗口");
        Thread windowThread2 = new Thread(ticketWindow,"二号窗口");
        Thread windowThread3 = new Thread(ticketWindow,"三号窗口");
        widowThread1.start();
        windowThread2.start();
        windowThread3.start();
    }
}
